﻿using SurfaceAd.Assistant;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

/**
 * 创建时间：2014/9/19 10:57:54
 * 作者：yong.blackcore
 * Email：itblackhole@outlook.com
 * QQ：50404503
 */
namespace SurfaceAd.Entities
{
    [DataContract]
    internal class AuthResponse
    {
        [DataMember(Name = "url")]
        public string url { get; set; }

        [DataMember]
        public string val { get; set; }

        [DataMember(Name = "data")]
        public string NetSpeed { get; set; }

        [IgnoreDataMember]
        public string No { get; set; }

        [IgnoreDataMember]
        public string U { get; set; }

        /// <summary>
        /// 调试模式
        /// </summary>
        private AdRequestModel adMode = AdRequestModel.Debug;

        [IgnoreDataMember]
        public AdRequestModel AdMode
        {
            get { return adMode; }
            set { adMode = value; }
        }


        public override string ToString()
        {
            if (string.IsNullOrWhiteSpace(url) && string.IsNullOrWhiteSpace(val) && string.IsNullOrWhiteSpace(NetSpeed))
            {
                return string.Empty;
            }
            return string.Format("URL:{0},VAL:{1},NETSPEED:{2}", url, val, NetSpeed);
        }
    }
}
